function uifftview_MakeImage( ax )
%UIFFTVIEW_MAKEIMAGE Summary of this function goes here
%   Detailed explanation goes here

h = uipreview_GetImage;
h_rect = getappdata(h, 'FFTROIHandle');
fft_roi= getPosition(h_rect);

gray= rgb2gray(get(h, 'CData'));
fft_data= gray((1:fft_roi(4))+fft_roi(2), (1:fft_roi(3)))+fft_roi(2);
psd=signal2pds(fft_data);
I= pds2gray(psd);

image( I, 'parent', ax , 'tag', 'uifftview',  'CDataMapping', 'scaled');
colormap('gray')
        
end

